
#!/bin/bash
set -ex

export  TZ='Asia/Shanghai'

time=$(date "+%Y-%m-%d %H:%M:%S")

echo "${time}"

user=$(whoami)

echo "${user}"

source_path="/tmp/docker"

kubectl delete pods --all -n app ||true

kubectl delete services  --all -n app ||true

kubectl delete namespace app||true

kubectl apply  -f ${source_path}/k8s/server/namespace.yml

kubectl apply  -f ${source_path}/k8s/server/secret.yml

# kubectl apply  -f ${source_path}/k8s/es.yml

# kubectl apply  -f ${source_path}/k8s/mongo.yml

#kubectl apply  -f ${source_path}/k8s/nacos.yml

kubectl apply  -f ${source_path}/k8s/server/back-service.yml

kubectl apply  -f ${source_path}/k8s/server/front-service.yml

kubectl apply  -f ${source_path}/k8s/cpolar.yml

# kubectl apply  -f ${source_path}/k8s/ngrok.yml

# exit 0